<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 
<%@ include  file="init.jsp"%>
<link rel="stylesheet" type="text/css" href="${resources}/css/index.css" />	 
<!--顶部 begin-->
<div class="top-area">
	<div class="top-panel">	
		<c:if test="${shiroMember!=null}">
		<span>您好,</span>
		<a href="${path}/manage/myCenter/myOrder">${shiroMember.member.username}</a>
		<a href="${path}/logout">登出</a>|
		<a href="${path}/manage/cart/cartShow?marketId=3" style="color:red;font-weight:bolder">购物车</a>|
		<a href="${path}/manage/myCenter/myOrder">我的订单</a>|
		</c:if>
		<c:if test="${shiroMember==null}">
		<span>您好, </span>
		<a href="${path}/login">[请登录]</a>
		<a href="${path}/reg">[免费注册]</a>|
		</c:if>
		<a href="javascript:void(0);" rel="sidebar" onclick="AddFavorite('${path}/','商城');" ><i class="fa fa-star c-warning top-start"></i>收藏我们</a>|
		<span>客服电话 400-8888888</span>
	</div>
</div>
<!--顶部 end-->
  
<!--搜索 begin-->
	<div class="search-area">
		<div class="search-logo">
			<a href="${path}">
				<img src="${resources}/images/logo_white.png">
			</a>
		</div>
		<form >
		<div class="search-panel">
			<p>
				<button type="button"  onclick="search()">搜索</button>
				<input id="hotsearch" placeholder="请输入关键词" name="search_CN_title" type="text">
			</p>
			<div class="search-hot-panel">
				<ul>
					<li>热门搜索：</li>
					<c:forEach items="${searchList}" var="search">
						<li><a href="${path}/commodity/goodslist?name=${search.hotsearch}">${search.hotsearch}</a></li>
				    </c:forEach>
				</ul>
			</div>
		</div>
		</form>
		<!-- 
		<div class="search_ad"><a href="#"><img src="../images/me_01.jpg"></a></div>
		-->
	</div>
	<!--搜索 end--> 
	
	<div class="navig-area">
	<div class="navig-panel">
		
		
		<!-- 分类  begin -->
		<div class="category-area">
			<div class="nav-all-category">
				<sapn class="all-category"><a href="${path}/commodity/goodslist" style="color:#fff;">全部商品分类</a>
			</sapn></div>
		 
	         <div class="category-panel">
	           <c:forEach  var="cate" items="${categoryList}" varStatus="status">
					<div class="category-view">
						<div class="category-panel-item">
							<h3><i class="fa fa-plane icon"></i>${cate.parent.name}<span></span></h3>
							<div class="category-ext">	
							   <c:forEach items="${cate.childList}" var="child" begin="0" end="2">
								   <a href="${path}/commodity/goodslist?categoryId=${child.id}">${child.name}</a>
							   </c:forEach> 
							</div>
						</div> 
						<div class="category-child-panel">
							<ul>
							 <c:forEach items="${cate.childList}" var="child"> 
								  <li class="c-title"><a href="${path}/commodity/goodslist?categoryId=${child.id}">${child.name}</a></li>
							 </c:forEach>
							</ul>
						</div>
					</div>
				</c:forEach> 
	</div>
		</div>
		<!-- 分类  end -->
		
		<div class="navigation" style="">
			<ul>
				<li> <a href="${path}">首页 </a></li>
				<!--
				<li> <a href="#">首页 </a></li>
				<li> <a href="#">首页 </a></li>
				<li> <a href="#">首页 </a></li>
				-->
			</ul>
		</div>
	
	
		 
	</div>
</div>
<script type="text/javascript">
function search(){
		var hot = $("#hotsearch").val();
		window.location.href="${path}/commodity/goodslist?name="+hot;
	}
</script>

   